<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets"> 

<h:head><p:panel id="titlePanel" header="Dati personali"></p:panel></h:head> 
<h:body> 
<h:form>
		<p:panel header="Dati">
			<h:panelGrid columns="4" id="regGrid">
				<h:outputLabel for="username">*Username:</h:outputLabel>
				<h:outputLabel id="usernameLabel" value="#{clienteBean.getUsername()}" for="username"></h:outputLabel>
				<p:inputText id="username" value="#{clienteBean.clienteDTO.username}"/>
				<p:message for="username" />

				<h:outputLabel for="Nome">*Nome:</h:outputLabel>
				<h:outputLabel value="#{clienteBean.getNome()}" for="Nome"></h:outputLabel>
				<p:inputText id="Nome" value="#{clienteBean.clienteDTO.nome}" />
				<p:message for="Nome" />

				<h:outputLabel for="Cognome">*Cognome:</h:outputLabel>
				<h:outputLabel value="#{clienteBean.getCognome()}" for="Cognome"></h:outputLabel>
				<p:inputText id="Cognome" value="#{clienteBean.clienteDTO.cognome}"/>
				<p:message for="Cognome" />
				
				<h:outputLabel for="Email">*Email:</h:outputLabel>
				<h:outputLabel value="#{clienteBean.getEmail()}" for="Email"></h:outputLabel>
				<p:inputText id="Email" value="#{clienteBean.clienteDTO.email}"/>
				<p:message for="Email" />
				
				<h:outputLabel for="Telefono"> Telefono:</h:outputLabel>
				<h:outputLabel value="#{clienteBean.getTelefono()}" for="Telefono"></h:outputLabel>
				<p:inputText id="Telefono" value="#{clienteBean.clienteDTO.telefono}"/>
				<p:message for="Telefono" />
				
				<h:outputLabel for="Città"> Città:</h:outputLabel>
				<h:outputLabel value="#{clienteBean.getCitta()}" for="Città"></h:outputLabel>
				<p:inputText id="Città" value="#{clienteBean.clienteDTO.citta}"/>
			</h:panelGrid>

			<h:panelGrid columns="6" id="regGrid2">
				<h:outputLabel for="password">*Password:       </h:outputLabel>
				
				<p:password id="password" value="#{clienteBean.clienteDTO.password}" 
					feedback="true" match="pwd2" label="Password"/>  
				<h:outputLabel for="pwd2">*Conferma Password:</h:outputLabel>
				<p:password id="pwd2" label="Conferma Password" 
					value="#{clienteBean.clienteDTO.password}"/>
				<p:message for="password" />
			</h:panelGrid>
			
			
			<p:commandButton value="Aggiorna i dati" update="regGrid" 
				action="#{clienteBean.aggiorna()}"/>

		</p:panel>
</h:form>

</h:body> 
</html>
